My host’s enemy is my enemy: plasmids carrying CRISPR-Cas as a defence against phages

Bacteria are infected by mobile genetic elements like plasmids and virulent phages, and those infections significantly impact bacterial ecology and evolution. Recent discoveries reveal that some plasmids carry anti-phage immune systems like CRISPR-Cas, suggesting that plasmids may participate in the coevolutionary arms race between virulent phages and bacteria. Intuitively, this seems reasonable as virulent phages kill the plasmid’s obligate host. However, the efficiency of CRISPR-Cas systems carried by plasmids can be expected to be lower than those carried by the chromosome due to continuous segregation loss, creating susceptible cells for phage amplification. To evaluate the anti-phage protection efficiency of CRISPR-Cas on plasmids, we develop a stochastic model describing the dynamics of a virulent phage infection against which a conjugative plasmid defends using CRISPR-Cas. We show that CRISPR-Cas on plasmids provides robust protection, except in limited parameter sets. In these cases, high segregation loss favours phage outbreaks by generating a population of defenceless cells on which the phage can evolve and escape CRISPR-Cas immunity. We show that the phage’s ability to exploit segregation loss depends strongly on the evolvability of both CRISPR-Cas and the phage itself.


Introduction
Bacteria are frequently infected by mobile genetic elements such as conjugative plasmids and virulent phages.These two types of mobile genetic elements spread in bacterial populations, and they are both dependent on their bacterial host to complete their life cycle.For the host, the fitness consequences of an infection depend on the type of mobile genetic element.On one hand, conjugative plasmid infection usually decreases the host's fitness [1], but plasmids can encode accessory genes, such as antibiotic resistance, that can provide the host a fitness advantage in certain environments.On the other hand, successful virulent phage infections always result in cell death [2].
The evolutionary ecology between bacteria and phages or plasmids has been extensively studied.On the phage side, it is known that an important part of their coevolution with bacteria is mediated by immune systems, such as CRISPR-Cas, which are sets of genes whose main function is to detect a phage infection and to protect the population against it [3].Plasmids also interact with bacterial immune systems, but generally less is known about the evolutionary consequences of those immune systems for plasmids.However, it is known that plasmid maintenance strongly depends on genes responsible for replication and conjugation, as well as on accessory genes.In greater detail, plasmid maintenance depends on (i) the cost/benefit it brings to its host, (ii) its rate of spreading horizontally through a mechanism called conjugation, and (iii) its ability to spread vertically during cell division.Importantly, this vertical transmission is imperfect, and a small fraction of daughter cells will not inherit the plasmid (segregation loss) [4].
Yet, much less is known about the interactions between plasmids and virulent phages.Virulent phages and conjugative plasmids frequently interact in natural environments as they are both highly prevalent in bacterial populations [5].Intuitively, one can expect virulent phage-plasmid interactions to be amensal: even if the phage's fitness is not modified by the presence of the plasmid, a virulent phage infection results in a cost for the plasmid, as it cannot survive the death of its host.There is evidence that under certain conditions a virulent phage infection can lead to the exclusion of an established, costly plasmid, exemplifying the evolutionary pressure phages inflict on plasmids [6].Therefore, one can expect that plasmids would benefit from evolving ways of protecting themselves (and consequently their host) against virulent phages.
Indeed, there is evidence that some plasmids carry systems to defend against phages.For example, plasmids frequently carry toxin-antitoxin systems, and some of these toxinantitoxin systems have been demonstrated to participate in phage inhibition [7][8][9][10].Recent bioinformatic studies show that toxin-antitoxin systems are not the only phage defence mechanism carried by plasmids: a small, but still significant proportion of plasmids carry CRISPR-Cas systems [11].CRISPR-Cas systems are a prevalent and well-known form of adaptive immunity that bacteria use to defend against phages [3].They consist of two loci, a Cas locus that codes for all the proteins the system needs to function, and a CRISPR locus, which can be seen as a library of small sequences (called spacers) acquired from previous invaders (such as phages or plasmids).Cas proteins use these spacers as guides to trigger the degradation of the foreign genome they target.About a third of the spacers carried by CRISPR-Cas on plasmids are predicted to target phages [11], raising the hypothesis that these systems can be used by plasmids to defend against phages.
However, there are reasons to hypothesize that CRISPR-Cas systems on plasmids may be unable to provide as efficient immunity against virulent phages as chromosomal CRISPR-Cas, because plasmids experience segregation loss.Indeed, immune loss is known to favour coexistence between phages and bacteria carrying CRISPR-Cas by increasing phage reproduction [12].Additionally, because a single point mutation in the phage protospacer (the phage sequence targeted by the spacer) is often enough to escape a spacer [13], segregation loss could result in a higher probability of escape, as the phage could evolve on this susceptible population [14].Nevertheless, how relevant segregation loss is in the complex tripartite interaction between CRISPR-Cas, plasmids and phages is unclear.
To test whether CRISPR-Cas carried by plasmids can provide the same anti-phage protection efficiency as chromosomal CRISPR-Cas and to identify key factors in this complex tripartite interaction that influence phage protection, we developed a stochastic model describing phage, bacterial, plasmid and CRISPR-Cas dynamics.We show that in most biologically relevant parameter sets, CRISPR-Cas on plasmids provides as efficient immunity as chromosomal CRISPR-Cas, further strengthening the evidence that plasmids can contribute to phage immunity of bacterial cells.In rare cases, CRISPR-Cas on plasmids provide a less efficient immunity than chromosomal CRISPR-Cas.We demonstrate that this reduced efficiency is due to segregation loss, which produces a subpopulation of susceptible cells that the phage can exploit to facilitate the escape of CRISPR-Cas immunity.Yet, whether segregation loss leads to a decreased CRISPR-Cas efficiency is strongly dependent on the phage's evolvability and the ability of CRISPR-Cas to acquire new spacers.

Model of plasmid, CRISPR-Cas and phage dynamics
Our mathematical model describes the potential of CRISPR-Cas systems carried by plasmids to protect a bacterial population from a phage outbreak in the early stages of an outbreak (figure 1).Experimental evidence shows that in the first days of an outbreak, cells only acquire a single spacer against the phage, which is often sufficient to drive the phage to extinction [15].Therefore, we assume in our model that each bacterial cell can only acquire a single spacer and each phage can only escape one spacer.If the phage is able to survive the initial phase of an outbreak, bacterial cells may acquire multiple spacers [16,17].However, our model does not consider this long-term dynamic.As a result, if multiple spacers per cell are necessary to drive the phage to extinction, our model predicts phage survival.
Our model is based on the model for type I/II CRISPR-Cas systems of Chabas et al. [18], with the addition of basic plasmid processes incorporated along the lines of Igler et al. [19].We chose to limit our analysis on type I CRISPR-Cas systems because type I CRISPR-Cas systems are the most frequent on bacterial chromosomes and plasmids [11,20].Our model considers that a phage contains multiple protospacers and that CRISPR-Cas will randomly pick between them each time a spacer is acquired [21,22].This results in a population-wide spacer diversity, which has been previously shown to be critical for the efficiency of CRISPR-Cas against evolving phages [14,15,18].In our model, we assume that the maximal number of different protospacers-and therewith spacers within the bacterial population-is limited by n S = 100.This number of spacers is sufficiently high to lead to phage extinction [18], allowing us to study the various potential outcomes of a phage outbreak.
We consider one type of plasmid with a CRISPR-Cas system, where plasmid copies can only differ in the CRISPR-Cas spacer content.As we are interested in phage protection, we only explicitly trace phage-specific spacers in our model.We assume that each CRISPR-Cas system is initially naive to the phage and can only acquire one spacer, as we only model the initial dynamics of a phage outbreak [18].Therefore, the bacterial population consists of the following compartments: (i) S: plasmid free cells, (ii) I S : bacterial cells infected with a plasmid carrying CRISPR-Cas system, that is naive to the phage, and (iii) I R i : cells infected with a plasmid carrying a CRISPR-Cas system with a phage-specific spacer i.

(a) Bacterial population size
Bacterial division is modelled by a density-dependent division rate g(1 − (T/K )), where g is the maximal division rate, T ¼ S þ I S þ P ns i¼1 I R i the total cell density and K the carrying capacity.The plasmid is associated with a fitness effect c (c > 0 representing a cost and c < 0 a benefit), which modifies the maximum division rate of plasmid carrying royalsocietypublishing.org/journal/rspb Proc.R. Soc.B 291: 20232449 cells by the factor (1 − c).Furthermore, we assume that bacteria die at a constant rate d.Altogether we obtain a model with a bounded bacterial population size, where the plasmid's fitness effect remains effective even after this bound is reached.The plasmid fitness effect influences only the rate of division but not the bounded bacterial population size.

(b) Segregation loss and conjugation
During cell division, plasmid carrying cells can lose the plasmid due to segregation loss with a probability τ.We assume a well-mixed population where plasmid conjugation depends on host cell density and occurs at a rate γ.As plasmids commonly carry exclusions systems [23], which prevent the conjugation of a plasmid into cells infected by the same plasmid variant, we exclude plasmid co-infection.

(c) Phage infection and spacer acquisition
If a wild-type (WT) phage P infects a cell S which does not carry a plasmid and therefore has no CRISPR-Cas system, the phage can successfully infect with rate β and amplify.
During this amplification, each of the n S protospacers of the WT phage can mutate with probability μ.We assume that a phage can only have one mutated protospacer and that mutations are not reversible.An infection of S by the WT phage leads to either b number of progeny WT phages, or in case of mutation, both the escape phage P i and the WT phage P amplify.We assume in this case, as Chabas et al. [18], that P and P i each produce half of their respective number of progeny: b/2 and b m /2.Additionally, we assume that the escape phages P i have lower fitness than the WT phage, i.e. b m < b as demonstrated experimentally for one model system [18,24].In case P infects a cell carrying a plasmid with a naive CRISPR-Cas system I S , the phage can either successfully infect and amplify (with opportunity for phage mutation), or the naive CRISPR-Cas system can acquire a spacer with a probability α, the then resistant cell survives the infection and no phage gets amplified.If a WT phage infects I R i , a cell which already carries spacer i, the phage infection fails.A failed phage infection leads to degradation of the phage without any consequences for the bacterial cell.
Escape phages P i can successfully infect plasmid-free cells S and cells with a naive CRISPR-Cas system I S , which royalsocietypublishing.org/journal/rspb Proc.R. Soc.B 291: 20232449 leads to cell death and b m number of progeny.Additionally, escape phages P i (with an escape mutation in protospacer i) can also successfully infect cells I R i , which carry spacer i.However, if the escape phage has an irrelevant mutation in protospacer j for the infection of I Ri , i.e. j ≠ i, the phage infection fails.

(d) Further simplifications to model the biological processes
For simplicity, we do not consider spacer acquisition of mutated phage sequences, but only of WT sequences.This event would only occur when P i infects I S , with a probability 1/n s in case of spacer acquisition.As in our model n s equals 100, such an event is rare.Furthermore, we disregard the possibility of within-cell spacer heterogeneity.Such heterogeneity could stem from multi-copy plasmids, where each copy of a plasmid carries a CRISPR-Cas system.In our model, we do not track plasmid copy number explicitly.In theory, each copy of the CRISPR-Cas system could acquire distinct spacers during a single phage infection, leading to within-cell spacer heterogeneity.However, if we assume that for each CRISPR-Cas system the probability of spacer acquisition is equal to or below α ≤ 10 −4 (for parameter choice see §2(e)) and assume independent acquisition for each CRISPR-locus, this event is extremely rare.Additionally, we exclude the possibility of withinspacer heterogeneity acquired through conjugation, as surface exclusion systems are believed to be common [23], which prevent a plasmid of the same exclusion class from entering the cell twice.Spacer heterogeneity could also stem from phage reinfection of a cell that already contains a spacer.However, for chromosomal CRISPR-Cas systems, there is some experimental evidence showing that cells with multiple spacers are rare during the initial phase of a phage outbreak [16].
We also do not consider natural phage decay as our model is designed to study the initial dynamics between CRISPR-Cas and a virulent phage.At that time scale, phage natural decay is negligible under laboratory conditions.
Besides capturing the dynamics of CRISPR-Cas on plasmids, our mathematical model also describes chromosomal CRISPR-Cas when all plasmid parameters are set to zero, i.e. γ = c = τ = 0.
The above described processes can be formalized with the following differential equations:

e) Implementation
For our investigations, we simulated equations (2.1)-(2.5)stochastically.Because we are interested in the initial dynamics between CRISPR-Cas and phages (i.e. a time frame of several days during which the majority of bacteria have acquired, at most, one spacer [15,16]), we terminated our simulations after a maximum of 160 h.However, in the vast majority of cases (greater than 99:5% of our simulations), we ended them earlier as either the phage or the bacteria went extinct (with a median and average time for extinction of 40 and 41 hours, respectively).For the implementation, we used the adaptivetau package (v.2.2-3) in R (v. 3.6.0),which implements the Gillespie algorithm with adaptive tau-leaping [25,26].For comparison, we ran simulations where the CRISPR-Cas system was located on a plasmid as well where it was located on the chromosome.For each parameter set, given by the parameter combinations in figure 1b (with fixed pairings of phage burst sizes: ðb, b m Þ ¼ f10, 9g, f100, 94g or f190, 179g), we simulated 100 runs, only for cases where the CRISPR-Cas system was located on the chromosome (γ, τ, c = 0) we ran 10 000 simulations.For chromosomal CRISPR-Cas, we increased the number of simulations as we compared several parameter sets of CRISPR-Cas on plasmids, which differed in plasmid conjugation, segregation loss and fitness effect, with one chromosomal CRISPR-Cas.All simulations were started with the following initial conditions: I S0 = 10 6 and P 0 = 10 5 , reflecting a phage infection of a growing bacterial population, where initially all bacteria carry a plasmid with a naive CRISPR-Cas system.The choice of bacterial growth parameters was based on Chabas et al. [18], but differs slightly due to different ways of modelling bacterial growth and death.
The probability to acquire a spacer is low with an estimate in royalsocietypublishing.org/journal/rspb Proc.R. Soc.B 291: 20232449 the magnitude of 10 −6 [27].To account for potential variations, we assume the highest and lowest probabilities of spacer acquisition α in our simulations to be 10 −4 and 10 −8 , respectively.The number of protospacers n s = 100 is based on Chabas et al. [18].We chose the ranges of phage mutation rate and of phage escape cost based on experimental data from Chabas et al. [24] (we assume that the measured cost only results from a decreased burst size).The range of phage burst size accounts for phages with a high burst size (e.g.[28]) but also acknowledges that virulent phages can have a very small burst size on certain hosts (e.g.[29][30][31]).
The parameter ranges for the plasmid conjugation rates and plasmid fitness effects were chosen in line with two meta-analyses on those two respective parameters [1,32].We used the same parameter range for segregation loss as Lehtinen et al. [33].For our simulations, we employed an exhaustive grid search approach by setting grid parameter values.Individual parameters were explored using equal linear or linear-log interval steps (figure 1), with a particular focus on plasmid parameters.

(f ) Identification of key parameters determining efficiency of CRISPR-Cas on plasmids
To estimate the association between CRISPR-Cas efficiency and CRISPR-Cas location, we calculated the risk difference (RD) of CRISPR-Cas phage protection efficiency, RD(V, F) ¼ PðV, F ; 0Þ À P(V, F), ð2:6Þ where P denotes the probability of phage extinction dependent on the chosen parameter set.V ¼ fa, m, b, b m g is the parameter set of CRISPR-Cas and phage characteristics and F ¼ fg, c, tg the parameter set of plasmid characteristics used in the simulations (values given in figure 1b).Simulations with F ; 0 represent chromosomal simulations.Within a given parameter set ðV, FÞ, the probability of phage extinction was calculated by dividing the number of simulations where the phage went to extinction by the total number of simulations ( plasmid: 100, chromosome: 10 000).For each RD, we calculated the corresponding 95% confidence intervals.Based on the 95% confidence intervals, we assumed an association between the location of CRISPR-Cas and phage protection efficiency.The CRISPR-Cas performance on a plasmid was considered worse than on the chromosome if the lower bound of the 95% confidence interval was above zero, better in case the upper bound was below zero, and the same if the 95% confidence intervals included zero.To explore the relevance of CRISPR-Cas, plasmid and phage characteristics on the performance of CRISPR-Cas on plasmids, we used a supervised learning model based on boosted gradient trees.The implementation was done with the R package eXtreme Gradient Boost (XGBoost v. 1.6.0.1 and R v. 4.2.1)[34], which relies on ensembles of trees.Further details about the concept of boosted gradient trees and algorithm details can be found in the XGBoost documentation [35].We used this supervised learning technique based on trees to accurately capture nonlinear effects.We fitted a statistical model with XGBoost predicting CRISPR-Cas performance of systems located on the plasmid based on the above-described categories: better, same, worse.We used CRISPR-Cas, plasmid and phage parameters as predictors for the statistical model.To assess the importance of biological parameters in predicting the performance of CRISPR-Cas on plasmids, we used the built-in importance function in XGBoost.This function calculates the gain for each feature, representing the improvement in accuracy that each feature brings to the model's decision branches where it is used [35].We aimed to restrict our investigation to biologically relevant parameter ranges, as the assessment of parameter importance is dependent on the choice of the parameter space under investigation.The choice of parameter ranges is explained in §2(e).

(a) Plasmids can efficiently protect against virulent phages using CRISPR-Cas
To determine whether plasmids can efficiently defend against virulent phages using their CRISPR-Cas systems, we implemented a stochastic model describing phage, plasmid and CRISPR-Cas dynamics.From this model, we extract the probability for a CRISPR-Cas system carried by a plasmid or by the chromosome to lead the phage to extinction (hereafter called CRISPR-Cas efficiency).We run this model using a range of plasmid, CRISPR-Cas and phage parameters that are biologically realistic (figure 1b).For each parameter set, we calculate the RD between the efficiency of chromosomal CRISPR-Cas and systems on plasmids (equation (2.6)) to quantify the association between the location of CRISPR-Cas and the protection efficiency.In total, we calculate the RD for 75 528 different parameter sets and the 95% confidence intervals.We assume an association between CRISPR-Cas efficiency and CRISPR-Cas location when the 95% interval does not include the value zero.For 84% of the parameter sets, we find no association between CRISPR-Cas efficiency and CRISPR-Cas location, which we categorize as 'same'.Only for 16% of our simulated parameter sets, we observe an association between location and CRISPR-Cas efficiency.In cases where we observe a difference in efficiency, CRISPR-Cas on plasmids is less efficient for 14% of the parameter sets, which we categorize as 'worse', and more efficient for 2% of the parameter sets, which we categorize as 'better' (figure 2).Since the percentage of parameter sets categorized as 'better' is very low (less than 2:5%), it is consistent with the hypothesis that those parameter sets do no differ significantly from those categorized as 'same'.We conclude that for most of our investigated parameter sets, plasmids carrying CRISPR-Cas can defend as efficiently against phages as chromosomes carrying CRISPR-Cas.
To gain better insight into the differences in CRISPR-Cas efficiency, we evaluate by how much the protection differs when plasmids provide altered protection efficiency.To do so, we calculate the mean RD for each group of parameter sets categorized as 'worse', 'same' or 'better'.For the parameter sets categorized as 'worse', we obtain a mean RD of 0.09, meaning that CRISPR-Cas on plasmids have an absolute decrease in efficiency of 9% compared with chromosomal CRISPR-Cas.The mean RD for parameter sets categorized as 'same' is zero and the mean RD for parameter sets categorized as 'better' is −0.02, meaning that CRISPR-Cas on plasmids have an absolute increase in efficiency of 2% compared with chromosomal CRISPR-Cas (figure 2).We royalsocietypublishing.org/journal/rspb Proc.R. Soc.B 291: 20232449 conclude that the difference in efficiency between CRISPR-Cas on plasmids and chromosomal CRISPR-Cas is the biggest when the plasmid provides weakened protection.
So far, we show that in 16% of our simulations with CRISPR-Cas on plasmids, the efficiency in immunity conferred by CRISPR-Cas on plasmids differs from the one conferred by a chromosomal CRISPR-Cas.However, it is unclear if the phage, CRISPR-Cas, or the plasmid influences this difference in immune efficiency the most.To determine this, we train a statistical classification model based on boosted gradient trees (further details in electronic supplementary material, S1).We observe that the model's most important parameters to distinguish between parameter sets where the plasmid provides 'worse', 'same' or 'better' efficiency, are the probabilities of (i) spacer acquisition α, (ii) segregation loss τ, and (iii) phage's protospacer mutation μ (figure 3a).We conclude that the outcome of this tripartite dynamic depends on all three entities, and that none can be neglected.How those parameters influence the ability of plasmids to defend against phages with CRISPR-Cas is investigated in the following.

(b) Plasmid segregation loss favours phage survival by facilitating evolutionary emergence
So far, we show that the probabilities of (i) spacer acquisition, (ii) segregation loss, and (iii) phage protospacer mutation are most important to predict the efficiency of plasmids in defending against phages using CRISPR-Cas.Because immune loss is known to favour phage survival [12], we hypothesize that segregation loss could be the most important parameter to explain cases when CRISPR-Cas on plasmids are less efficient.To test for this, we determine which parameters are used by the previously described classification model to identify the 'worse' class (figure 3b), and indeed confirm that segregation loss is the most important parameter to determine when CRISPR-Cas on plasmids perform worse.Therefore, we now focus on investigating how segregation loss weakens the ability of plasmids to protect against phages using CRISPR-Cas.We reason that there are three non-mutually exclusive mechanisms which can explain this.First, segregation loss could decrease the generated population-based spacer diversity, which is known to be key for phage survival [14,15] (spacer diversity hypothesis).During segregation loss, one daughter cell does not inherit the plasmid and its CRISPR-Cas system.This results in a smaller number of cells carrying CRISPR-Cas, and consequently, in a smaller number of cells that have the opportunity to acquire a spacer.This could lead to a lower spacer diversity, which favours phage survival.
Second, segregation loss generates a population of susceptible cells, which could be large enough to produce more phage virions than can be killed by cells carrying a spacer, resulting in phage survival ( phage amplification hypothesis).
Third, segregation loss could facilitate evolutionary emergence, i.e. outbreaks caused by phage escape mutants ( phage evolution hypothesis).In this scenario, there are more opportunities for the WT phage to evolve escape mutations as it has more susceptible cells to infect.Additionally, there is a higher survival probability for the newly generated escape mutants, as their host population is increased.This could bias the arms We first test the validity of the spacer diversity hypothesis by assessing if an increase in segregation loss decreases the initial spacer diversity (spacer diversity when no naive CRISPR-Cas system remains in the population), as after this time point, no new distinct spacers can be introduced in the population.We observe that the initial spacer diversity is not influenced by segregation loss (electronic supplementary material, figure S1 C,D), ruling out the spacer diversity hypothesis.
To test the phage amplification hypothesis, we set the phage protospacer mutation probability to zero (μ = 0).By doing so, we test if the amplification of the WT phage P without the evolution of escape mutants explains why segregation loss weakens the ability of plasmids to efficiently defend using CRISPR-Cas.In this case, we do not observe any decrease in phage protection efficiency while increasing segregation loss (figure 4b), which rules out the phage amplification hypothesis.This also shows that the susceptible population can only decrease CRISPR-Cas efficiency in case the phage has the ability to escape CRISPR-Cas.
We show that segregation loss only leads to decreased CRISPR-Cas efficiency when the phage is able to escape CRISPR-Cas, which is consistent with the phage evolution hypothesis.To further investigate the phage evolution hypothesis, we analyse the proportion of escape phages both at the beginning and at the end of the phage outbreak, considering varying degrees of segregation loss.We observe that, during the very early stages of the outbreak, the proportion of escape mutants is consistently low, regardless of the level of segregation loss.However, at the end of the phage outbreak, we observe the dominance of escape mutants when segregation loss is high (electronic supplementary material, figure S2).This confirms the phage evolution hypothesis, showing that a decreased CRISPR-Cas efficiency results from segregation loss favouring the outbreak of escape phages.
(c) The benefit of segregation loss in facilitating evolutionary emergence is governed by CRISPR-Cas and phage characteristics Overall, we show that plasmid, phage and CRISPR-Cas parameters are important to predict the performance of plasmids using CRISPR-Cas.So far, we only explain the role of segregation loss.We will not investigate the relevance of further plasmid parameters, i.e. conjugation and fitness effect, as our statistical model indicates that they only have minor relevance on CRISPR-Cas efficiency (figure 3).In the following, we aim to understand the impact of the remaining CRISPR-Cas and phage parameters on the plasmid's ability to defend against phages using CRISPR-Cas.We first investigate the impact of CRISPR-Cas biology, which is represented in our model by the probability of spacer acquisition α, on the efficiency of CRISPR-Cas on plasmids.In line with previous studies, we show that the probability of spacer acquisition has a high impact on phage survival [18,36,37] and that efficiency differences between CRISPR-Cas on plasmids and chromosomal CRISPR-Cas Importantly, we find that even in cases where plasmids undergo high segregation loss, CRISPR-Cas on plasmid can provide the same phage protection as chromosomal CRISPR-Cas when spacer acquisition is high (figure 4a).In those cases, the probability of acquiring a spacer (CRISPR-Cas evolutionary potential) is high enough to ensure evolutionary rescue of the bacterial population from the evolving phage population independent of the probability of segregation loss.At low acquisition probabilities, the phage is likely to kill the bacteria before CRISPR-Cas could acquire any spacer (electronic supplementary material, figure S1a), making the presence of a subpopulation for phage evolution redundant.Therefore, the presence of a subpopulation of susceptible cell does not necessarily lead to an increase in phage survival.Last, we explore the role of phage parameters, i.e. the protospacer mutation probability μ and the phage burst size b, on the efficiency of CRISPR-Cas on plasmids.We find that the phage's evolutionary potential, i.e. its mutation probability and its burst size, can modify the benefit segregation loss provides to the phage.When the phage has a high protospacer mutation probability, this advantage in the coevolutionary arms race between CRISPR-Cas and phage can be sufficient to ensure phage survival, and the phage is less dependent on segregation loss for its survival (figure 5a).However, in case the phage does not show high levels of mutations, segregation loss provides a benefit for phage survival and therefore decreases the efficiency of CRISPR-Cas on plasmids.Besides mutation, the phage burst size can also alter the evolutionary potential of phages.Indeed, we see in case the evolutionary potential is lowered by a small phage burst size, that segregation loss matters less for the efficiency of CRISPR-Cas on plasmids (figure 5b).In summary, we conclude that the evolutionary potentials of CRISPR-Cas and phage, which are determined in our model by the probabilities of acquiring a spacer or of mutating a protospacer and the phage burst size, can decrease the probability of evolutionary emergence, thus decreasing the impact of segregation loss on the immune efficiency a plasmid provides using CRISPR-Cas.

Discussion
In this work, we investigate if plasmids can provide an as efficient anti-phage immunity using CRISPR-Cas as chromosomal CRISPR-Cas systems.We show that, in 86% of the investigated parameter sets, CRISPR-Cas on plasmids provides at least the same protection efficiency as a chromosomal CRISPR-Cas system.However, for 14% of the tested parameter sets, we find a considerable decrease in efficiency for CRISPR-Cas on plasmids.Additionally, we show that in these limited sets of parameters, high segregation loss decreases CRISPR-Cas efficiency as it facilitates phage evolutionary emergence.However, high segregation loss does not necessarily lead to decreased efficiency of CRISPR-Cas on plasmids.Whether segregation loss alters the performance of CRISPR-Cas on plasmids is also strongly dependent on the phage and CRISPR-Cas.Overall, our results emphasize the importance of studying the interactions of multiple royalsocietypublishing.org/journal/rspb Proc.R. Soc.B 291: 20232449 mobile genetic elements to estimate the consequences of their interactions for bacterial ecology and evolution, contributing to the recent attention in understanding the multi-party interactions between mobile genetic elements [6,10,[38][39][40].
We show that the presence of cells without a CRISPR-Cas system promotes phage survival, consistent with previous research [12].In addition, we identify the conditions, dependent on both CRISPR-Cas and the phage, that allow segregation loss to increase phage survival.We also describe the driving mechanism for increased phage survival, i.e. the facilitation of phage outbreaks caused by phages that escape CRISPR-Cas.However, most conjugative plasmids encode mechanisms such as partitioning systems or addiction systems, which are effective in keeping segregation loss low [41].Experiments have shown that plasmids often have a probability of segregation loss of at most 10 −3 or lower [4,42].Therefore, our results indicate that plasmids with a CRISPR-Cas system can reliably defend against virulent phages.
Our model captures the initial dynamics of the CRISPR-Cas and virulent phage interactions, where CRISPR-Cas efficiency depends on the population-wide spacer heterogeneity, with each cell possessing a single spacer [15].In the initial phase, either phages or bacteria often go extinct [15,16].Occasionally, both phages and bacteria survive, initiating a long-term evolutionary arms race characterized by multiple spacer acquisitions and the acquisition of spacers from resistant phages' mutated protospacers.This longterm dynamics is not captured in our model, preventing an assessment of whether CRISPR-Cas on plasmids could potentially have a disadvantage when multiple spacer acquisition could have rescued the bacterial population.
Interestingly, CRISPR-Cas systems carried by plasmids generally contain more spacers targeting other plasmids than phages, whereas chromosomal CRISPR-Cas contain more spacers targeting phages [11,41].Our results show for CRISPR-Cas systems on plasmids that the relatively low proportion of spacers targeting phages cannot necessarily be explained by a decreased phage protection efficiency.This could support the hypothesis that the bias of CRISPR-Cas systems on plasmids towards spacers targeting other plasmids results from their involvement in plasmid-plasmid competition [11].Indeed, a bacterial cell can usually be infected by multiple distinct plasmids and if plasmid interactions are detrimental for two co-infecting plasmids, it results in positive frequency selection, ultimately driving the exclusion of the less frequent plasmid from the bacterial population even if the plasmids are otherwise equally fit [19].Consequently, even though plasmids can be burdensome for bacterial cells, the selection pressure to defend against other plasmids might be higher for a plasmid than the bacterial cell itself.Moreover, the selection pressure to defend against phages is expected to be high for both bacterial cells and plasmids.However, if the bacterial cell is already efficient in defending against phages, the selection pressure to keep anti-phage spacers on plasmids will be weakened and this could result in an increased frequency of spacers targeting competing plasmids.
As our results show that CRISPR-Cas efficiency is for most of the parameter sets studied here independent of its location, phage protection might potentially be outsourced to plasmids.There are several factors that could favour CRISPR-Cas to be carried by plasmids.First, it has been royalsocietypublishing.org/journal/rspbProc.R. Soc.B 291: 20232449 investigated which evolutionary forces drive a gene to be carried by a plasmid rather than the chromosome.[33,43] Theory predicts that moderately beneficial genes may indeed reside on plasmids rather than on the chromosome, but very beneficial genes are predicted to be carried on the chromosome [33].Given that CRISPR-Cas can be essential for bacterial survival during a phage attack, it is expected to be located on the chromosome.However, bacteria typically carry several defence mechanisms against phages [3], and some of those defence mechanisms can work synergistically [44,45].Consequently, CRISPR-Cas may not always be essential but moderately beneficial for bacterial survival and therefore it could be located on a plasmid.Second, phages that depend on plasmids for infection are more abundant than previously thought [39].These phages can only infect bacterial cells hosting a plasmid.Consequently, plasmid carriage can confer additional evolutionary pressure on bacteria besides the commonly discussed plasmid fitness effect on bacterial replication.To lower this burden, plasmids may potentially carry CRISPR-Cas to defend against those plasmid-dependent phages and ensure plasmid maintenance.Bioinformatic analysis could be used to test whether the phage spacer content of CRISPR-Cas carried by plasmids shows a bias towards plasmid-dependent phages.Third, CRISPR-Cas may be favoured to be carried by multi-copy plasmids, in case multiple copies of CRISPR-systems would have synergistic effects and therewith increase phage protection efficiency.Higher phage protection efficiency could be achieved through a higher likelihood for a cell to carry several spacers targeting a given phage (within-cell spacer diversity), which is known to be more efficient in blocking phage evolutionary emergence than population-wide spacer diversity [46].However, it is generally unclear if carrying multiple copies of CRISPR-Cas increases within-cell spacer diversity or confers other benefits.In summary, we show that CRISPR-Cas on plasmids provides robust protection against virulent phages, showing that plasmids carrying CRISPR-Cas could play a role in phage defence.This highlights the importance of considering the interaction between mobile genetic elements (including their arsenal of immune defences) to understand the ecology and evolution of bacteria in complex environments.

Figure 1 .
Figure 1.Visualization of the modelled CRISPR-Cas, plasmid and phage dynamics and the corresponding parameters.(a1) Schematic diagram of plasmid and CRISPR-Cas dynamics illustrating the processes described by equations (2.1)-(2.3).(a2) Schematic diagram of phage infection and CRISPR-Cas processes described by equations (2.1)-(2.5).(b) Overview of model processes, associated parameters and simulation parameter values.The choice of model parameters is specified in the main text in §2(e).

Figure 2 .
Figure 2. Anti-phage protection performance of plasmids using CRISPR-Cas.Percentage of all simulated plasmid parameter sets stratified according to CRISPR-Cas performance in comparison with chromosomal CRISPR-Cas.The mean RD between CRISPR-Cas efficiency on the chromosome and CRISPR-Cas efficiency on the plasmid is shown for each category.

Figure 3 .
Figure 3. Importance of biological parameters to predict CRISPR-Cas performance on plasmids.(a) Global importance of parameters in classifying the CRISPR-Cas efficiency on plasmids into the three categories 'worse', 'same' and 'better'.(b) The model's most important parameters in determining when the CRISPR-Cas efficiency on plasmids is worse than the efficiency of chromosomal systems.

Figure 4 .
Figure 4. Impact of varying acquisition rates, segregation loss and phage mutation on the probability of phage extinction (CRISPR-Cas efficiency).(a) The phage has the possibility to escape acquired spacers by mutating protospacers with probability μ = 3.4 × 10 −7 .(b) The phage has no possibility to escape acquired CRISPR-Cas spacers μ = 0.The conjugation rate, plasmid cost and phage burst sizes are fixed at γ = 10 −14 , c = 0.05, b = 190 and b m = 179.The probability of phage extinction for CRISPR-Cas systems on the chromosome is indicated in pink.In the chromosomal simulations, the conjugation rate γ, the probability of losing the plasmid τ and plasmid fitness effect c are set to zero.

10 , b m : 9 bFigure 5 .
Figure 5. Impact of segregation loss on the probability of phage extinction (CRISPR-Cas efficiency) depending on phage characteristics.For different phage protospacer mutation probability (a) or phage burst sizes (b), we show the distribution of CRISPR-Cas efficiency across all the tested probabilities of segregation loss (figure 1) for each probability of spacer acquisition.Hence, a wider boxplot indicates a greater impact of segregation loss on CRISPR-Cas efficiency.The conjugation rate and plasmid cost are fixed at γ = 10 −14 and c = 0.05.The phage burst size is fixed in (a) to b = 190, b m = 179 and the protospacer mutation probability in subplot (b) to μ = 3.4 × 10 −7 .